package zz;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;

public class HelloWorldServlet extends HttpServlet {
    private static final String CONIENT_TYPE = "text/html; charset=GBK";
    public void init() throws ServletException{

    }
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
        response.setContentType(CONIENT_TYPE);
        PrintWriter out = response.getWriter();
        out.println("<html>");
        out.println("<head><title>HelloWorldServlet</title></head>");
        out.println("<body bgcolor=\'#ffffff'>");
        out.println("Hello World!");
        out.println("</body>");
        out.println("</html>");
        out.close();
    }
    public void destroy(){

    }

}
